package com.qiyu.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;
import java.io.Serializable;
import java.util.Date;

/**
 * mybatis-plus 基础实体
 *
 * @author zhangweiwei
 * @date 2020/7/30
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode
@MappedSuperclass
public class EntityTwo<T extends Model<?>> extends Model<T> {

    private static final long serialVersionUID = 739668778715426461L;


    @TableLogic
    @ApiModelProperty(value = "是否删除", hidden = true)
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(update = "now()")
    @ApiModelProperty("修改时间")
    private Date updateTime;



}
